<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:sec="http://www.springframework.org/security/facelets/tags">

    <f:view contentType="text/html">
        <h:head>
            <!--<link href="#{facesContext.externalContext.requestContextPath}/resources/css/style.css" rel="stylesheet" type="text/css" />-->
            <meta content='text/html; charset=UTF-8' http-equiv="Content-Type"/>
            <h:outputStylesheet library="css" name="style.css" />
            <!-- Latest compiled and minified CSS -->
            <h:outputStylesheet library="css" name="bootstrap.min.css" />
            <!-- Optional theme -->
            
            <h:outputStylesheet library="css" name="bootstrap-theme.css" />
            <!-- Latest compiled and minified JavaScript -->
            <script src="#{facesContext.externalContext.requestContextPath}/resources/js/bootstrap.min.js"></script>
            
            <title>PrimeFaces</title>
        </h:head>

        <h:body>

            <p:layout fullPage="true">

                <p:layoutUnit position="north" size="100" resizable="true" closable="true" collapsible="true" >
                    <a href="#{facesContext.externalContext.requestContextPath}/site/paginas/principal.jsf">
                        <img src="#{facesContext.externalContext.requestContextPath}/resources/img/logo.png" width="180px;" style="margin-left: 10px;"/>
                    </a>
                </p:layoutUnit>

                <p:layoutUnit position="south" size="100" closable="true" collapsible="true" id="preenchimento">
                    <div class="rodape-texto" style="float: right; margin: 30px 20px 0 0;">
                        © 2014 CN Sistemas. Todos os direitos reservados.
                    </div>
                    <div class="rodape-texto" style="float: left; margin: 12px 0 0 20px;">
                        <div>
                            <img src="#{facesContext.externalContext.requestContextPath}/resources/img/phone.png"/>
                            <span style="margin-left: 5px;">Contato: (99)9999-9999</span>
                        </div>  
                        <div style="margin-top: 5px;">
                            <span class="glyphicon glyphicon-envelope" style="font-size: 30px;"></span>
                            cnsistemas@gmail.com
                        </div>
                    </div>
                    <ui:remove>
                    <p:ajaxStatus style="position: relative;float: right;">  
                        <f:facet name="start">
                            <h:graphicImage value="../../resources/img/ajax-loader.gif" />
                        </f:facet>
                        <f:facet name="complete">
                            <h:outputText value="" />
                        </f:facet>
                    </p:ajaxStatus>
                    </ui:remove>
                </p:layoutUnit>
                
                <p:layoutUnit position="west" size="205" header="Menu" collapsible="true" rendered="#{sec:ifNotGranted('ROLE_ANONYMOUS')}">
                    <p:slideMenu backLabel="voltar">
                        <p:menuitem value="Home" icon="ui-icon-home" url="../paginas/principal.jsf" />
                        <p:submenu label="Pessoas" icon="ui-icon-person">
                            <p:menuitem value="Manutenção de Usuário" url="../paginas/manutencao_usuario.jsf" />
                        </p:submenu>
                        <p:submenu label="Financeiro" icon="ui-icon-calculator">
                            <p:menuitem value="Faturas" icon="ui-icon-print" url="../paginas/financeiro_fatura.jsf" />
                        </p:submenu>
                        <p:submenu label="Relatórios" icon="ui-icon-document">
                            <p:menuitem value="Log de Fatura" icon="ui-icon-zoomin" url="../paginas/relatorio_logfatura.jsf" />
                        </p:submenu>
                        <p:submenu label="Configurações" icon="ui-icon-gear">
                            <p:menuitem value="Layout" url="#" icon="ui-icon-bookmark"/>
                            <p:menuitem value="E-mail" icon="ui-icon-mail-closed" url="../paginas/manutencao_email.jsf" />
                        </p:submenu>
                        <p:menuitem value="Sair" icon="ui-icon-power" url="/j_spring_security_logout" />
                    </p:slideMenu>
                </p:layoutUnit>
                    
                <p:layoutUnit position="center">
                    <ui:insert name="corpo">
                        <!-- Corpo de dados aqui. -->
                        <!-- Para linkar algo aqui, use <ui:define name="corpo"> -->
                    </ui:insert>
                </p:layoutUnit>

            </p:layout>

        </h:body>

    </f:view>
</html>

